package com.pengbos;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class PhotoEntries {
	
	private Map<Long, PhotoEntry> photosMap;
	
	private List<PhotoEntry> photos;
	
	private static PhotoEntries entries = new PhotoEntries();
	
	private PhotoEntries(){
		photos = new ArrayList<PhotoEntry>();
		
		photosMap = new HashMap<Long, PhotoEntry>();
		
		//photo1
		PhotoEntry photo = new PhotoEntry();
		
		List<ReceiverDetail> corporatticaReceivers = new ArrayList<ReceiverDetail>();
		
		ReceiverDetail receiverMe = new ReceiverDetail();
		receiverMe.setAmount(17);
		receiverMe.setEmail("tangpb@hotmail.com");
		receiverMe.setPaymentType("GOODS");
		
		corporatticaReceivers.add(receiverMe);
		
		ReceiverDetail receiverParterner = new ReceiverDetail();
		receiverParterner.setAmount(8);
		receiverParterner.setEmail("luka@solucija.com");
		receiverParterner.setPaymentType("GOODS");
		
		corporatticaReceivers.add(receiverParterner);
		
		photo.setTitle("Corporattica");
		photo.setId(1);
		photo.setUrl("http://pengbos.com/wp-content/uploads/2011/03/corptheme.jpg");
		photo.setReceivers(corporatticaReceivers);
		
		//photo2
		PhotoEntry photo2 = new PhotoEntry();
		
		List<ReceiverDetail> aureliusReceivers = new ArrayList<ReceiverDetail>();
		
		ReceiverDetail receiverMain = new ReceiverDetail();
		receiverMain.setAmount(25);
		receiverMain.setEmail("tangpb@hotmail.com");
		receiverMain.setPaymentType("GOODS");
		
		aureliusReceivers.add(receiverMain);
		
		
		photo2.setTitle("Aurelius");
		photo2.setUrl("http://pengbos.com/wp-content/uploads/2010/10/aurelius.png");
		photo2.setId(2);
		photo2.setReceivers(aureliusReceivers);
		
		//photo3
		PhotoEntry photo3= new PhotoEntry();
		
		photo3.setId(3);
		photo3.setTitle("Greenie");
		photo3.setUrl("http://pengbos.com/wp-content/uploads/2010/10/work1.jpg");
		
		List<ReceiverDetail> greenieReceivers = new ArrayList<ReceiverDetail>();
		
		ReceiverDetail greenieReceiverMe = new ReceiverDetail();
		greenieReceiverMe.setAmount(20);
		greenieReceiverMe.setEmail("tangpb@hotmail.com");
		greenieReceiverMe.setPaymentType("GOODS");
		
		greenieReceivers.add(greenieReceiverMe);
		
		photo3.setReceivers(greenieReceivers);
		
		
		photos.add(photo);
		photos.add(photo2);
		photos.add(photo3);
		
		photosMap.put(photo.getId(), photo);
		photosMap.put(photo2.getId(), photo2);
		photosMap.put(photo3.getId(), photo3);
	}
	
	public Map<Long, PhotoEntry> getPhotosMap() {
		return photosMap;
	}

	public static PhotoEntries getInstance(){
		
		return entries;
	}
	
	public List<PhotoEntry> getPhotoEntries(){
		return this.photos;
	}

	
}
